package com.itheima.d5_data_stream;

import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

public class DataOutputStreamTest1 {
    public static void main(String[] args)  {
        try (DataOutputStream dos = new DataOutputStream(
                new FileOutputStream
                        ("C:\\Users\\dell\\IdeaProjects\\file-io-app\\io-app2\\src\\itheima10.txt"))
        ) {
            dos.write(97);
            dos.writeDouble(99.5);
            dos.writeBoolean(true);
            dos.writeUTF("黑马程序员666");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
